package com.soft.javase.ch07.pane;

import javax.swing.*;

/**
 * @author wangzhisen
 * @Desc TODO
 * @date 2025/4/28
 */
public class JOptionPaneDemo {

    public static void main(String[] args) {
        //信息弹窗
        /*JOptionPane.showMessageDialog(null, "登陆成功", "通知",
                JOptionPane.INFORMATION_MESSAGE);*/

        //输入框弹窗
     /*   String s = JOptionPane.showInputDialog(null, "请输入对方账户：");
        System.out.println("s = "+s);*/

        //询问对话框
        int i = JOptionPane.showConfirmDialog(null, "您确认退出么？", "询问",
                JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
        System.out.println("i="+i);
    }
}
